package com.ruoyi.project.api.user;

import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.course.course.domain.BCourse;
import com.ruoyi.project.course.course.service.IBCourseService;
import com.ruoyi.project.courseuser.courseuser.entity.req.AddCourseUserReq;
import com.ruoyi.project.courseuser.courseuser.service.IBCourseUserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 课程报名
 */

@RestController
@RequestMapping("/api/courseUser")
public class WebCourseUserController extends BaseController {

    @Autowired
    IBCourseUserService courseUserService;

    @ApiOperation("课程报名")
    @Log(title = "APP接口管理", businessType = BusinessType.OTHER)
    @PostMapping("/addCourseUser")
    public AjaxResult addCourseUser(AddCourseUserReq req, HttpServletRequest request) {

        return courseUserService.addCourseUser(req);
    }





}
